import axios from '@/libs/api.request'
import { getToken } from '@/libs/util'

export const queryGbServerList = () => {
  return axios.request({
    url: '/admin/gb-service/query/list/',
    method: 'post',
    dataType: 'json',
    headers: {
      'Content-Type': 'application/json; charset=UTF-8',
      'token': getToken()
    }
  })
}
/*
分页用户
 */
export const queryPage = (param) => {
  return axios.request({
    url: '/admin/gb-service/query/page/',
    method: 'post',
    dataType: 'json',
    headers: {
      'Content-Type': 'application/json; charset=UTF-8',
      'token': getToken()
    },
    data: param
  })
}

export const addGbServer = (param) => {
  return axios.request({
    url: '/admin/gb-service/add/',
    method: 'post',
    dataType: 'json',
    headers: {
      'Content-Type': 'application/json; charset=UTF-8',
      'token': getToken()
    },
    data: param
  })
}
export const updateGbServer = (param) => {
  return axios.request({
    url: '/admin/gb-service/update/',
    method: 'post',
    dataType: 'json',
    headers: {
      'Content-Type': 'application/json; charset=UTF-8',
      'token': getToken()
    },
    data: param
  })
}

export const removeGbServer = (param) => {
  return axios.request({
    url: '/admin/gb-service/delete/',
    method: 'post',
    dataType: 'json',
    headers: {
      'Content-Type': 'application/json; charset=UTF-8',
      'token': getToken()
    },
    data: param
  })
}

export const getOne = (param) => {
  return axios.request({
    url: '/admin/gb-service/get/one/',
    method: 'post',
    dataType: 'json',
    headers: {
      'Content-Type': 'application/json; charset=UTF-8',
      'token': getToken()
    },
    data: param
  })
}
